package thinkInJava.chap13String;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @description:
 * @author: Lisp
 * @time: 2020/9/16 16:59
 */
public class TestReqularExpression {

//    public static void main(String[] args) {
//        if (args.length < 2) {
//            System.out.println("Usage:\njava TestReqularExpression " + "characterSequence reqularExpression");
//            System.exit(0);
//        }
//
//        System.out.println("Input: \"" +args[0] +"\"");
//        for (String arg : args) {
//            System.out.println("Reqular expression :\""+ arg +"\"");
//            Pattern p = Pattern.compile(arg);
//            Matcher m = p.matcher(args[0]);
//            while (m.find()) {
//                System.out.println("Match \"" + m.group() + "\" at positions " + m.start() + "-" + (m.end() - 1));
//            }
//        }
//    }
}

class Test {
//    public static void main(String[] args) {
//        TestReqularExpression.main(new String[]{"abcabcabcdefabc","abc","abc"});
//    }
}